﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using CommonExtensions.IEnumerableExtensions;
using Xunit;

namespace CommonExtensions.Tests
{
    public class IEnumerableExtensionsTests
    {
        [Fact]
        public void IsEmptyShouldThrowIfNull()
        {
            List<object> list = null;
            Assert.Throws<ArgumentNullException>(() => list.IsEmpty());
        }

        [Fact]
        public void IsEmptyShouldReturnTrueIfEmpty()
        {
            Assert.True(new List<object>().IsEmpty());
        }

        [Fact]
        public void IsEmptyShouldReturnFalseIfNotEmpty()
        {
            Assert.False(new List<string>() { "Test" }.IsEmpty());
        }
    }
}